<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE>
Resource properties
</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
</HEAD>
<BODY BGCOLOR="#ffffff">

<h2>Resource properties</h2>
<p>Resources have properties that can be used to store meta-information about the resource.  Your plug-in
can use these properties to hold information about a resource that is specific to your purpose.
Resource properties are declared, accessed, and maintained by various plug-ins, and are not interpreted 
by the platform.  When a resource is deleted from the workspace, its properties are also deleted.
</p>
<p>There are two kinds of resource properties:
</p>
<ul>
<li><b>Session properties</b> allow your plug-ins to easily cache information about a resource in key-value pairs.
The values are arbitrary objects.&nbsp; These properties are maintained in memory and lost when a resource is 
deleted from the workspace, or when the project or workspace is closed.</li>
<li><b>Persistent properties</b> are used to store resource-specific information on disk.  The value of a 
persistent property is an arbitrary string. Your plug-in decides how to interpret the string.  The strings are 
intended to be short (under 2KB).  Persistent properties are stored on disk with the platform metadata and 
maintained across platform shutdown and restart.</li>
</ul>
<p>If you follow the convention of qualifying property key names with the unique id of your plug-in, you won't 
have to worry about your property names colliding with those of other plug-ins.
</p>
<p>If your plug-in needs to store persistent information about a project that is much larger than 2 KB, then these
properties should be exposed as resources in their own right, rather than using the persistent properties API.
</p>
<p>See <b><a href="../reference/api/org/eclipse/core/resources/IResource.html">
IResource</a></b> for a description of the API for getting and setting the different kinds
of resource properties.
</p>

</BODY>
</HTML>
